package cn.gong.http;

import cn.gong.http.bean.HttpTask;
import cn.gong.http.callback.HttpCallBack;
import cn.gong.http.net.AsyncHttp;

public class Http {
	public static final int GET = 0;
	public static final int POST = 1;

	public static final String CLASSNAME_STRING = "java.lang.String";
	public static final String CLASSNAME_URLENCODE_STRING = "cn.gong.http.bean.URLEncoderStr";
	public static final String CLASSNAME_FILE = "java.io.File";

	public static final String CHARSET_UTF_8 = "utf-8";
	public static final String CHARSET_ISO_8859_1 = "ISO-8859-1";
	public static final String CHARSET_GBK = "gbk";
	public static final String CHARSET_GB2312 = "gb2312";

	public static void doTask(HttpTask task, HttpCallBack callBack) {
		AsyncHttp.getInstance().doTask(task, callBack);
	}

	public static void doTask(HttpTask task, HttpCallBack callBack, String charset) {
		AsyncHttp.getInstance().doTask(task, callBack, charset);
	}
}
